#ifndef __TLI_H
#define __TLI_H
#include "PublicFile.h"
#include "extern_sdram.h"
/**************硬件引脚定义********************/
#define TLI_HS_PORT				GPIOC
#define TLI_HS_PIN				GPIO_PIN_6
	
#define	TLI_VS_PORT				GPIOA
#define TLI_VS_PIIN				GPIO_PIN_4

#define TLI_DE_PORT				GPIOF
#define TLI_DE_PIN				GPIO_PIN_10

#define TLI_PIXCLK_PORT		GPIOG
#define TLI_PIXCLK_PIN		GPIO_PIN_7

#define TLI_BL_PORT				GPIOD
#define TLI_BL_PIN				GPIO_PIN_12

#define TLI_RESET_PORT		GPIOD
#define TLI_RESET_PIN     GPIO_PIN_13

#define TLI_RED3_PORT 		GPIOB
#define TLI_RED3_PIN			GPIO_PIN_0
	
#define	TLI_RED4_PORT			GPIOA
#define TLI_RED4_PIN			GPIO_PIN_11

#define TLI_RED5_PORT			GPIOA
#define TLI_RED5_PIN			GPIO_PIN_12

#define TLI_RED6_PORT			GPIOA
#define TLI_RED6_PIN			GPIO_PIN_8

#define TLI_RED7_PORT			GPIOG
#define TLI_RED7_PIN			GPIO_PIN_6

#define TLI_GREEN2_PORT		GPIOA
#define TLI_GREEN2_PIN		GPIO_PIN_6

#define TLI_GREEN3_PORT		GPIOG
#define TLI_GREEN3_PIN		GPIO_PIN_10

#define TLI_GREEN4_PORT		GPIOB
#define TLI_GREEN4_PIN		GPIO_PIN_10
	
#define TLI_GREEN5_PORT		GPIOB
#define TLI_GREEN5_PIN		GPIO_PIN_11

#define TLI_GREEN6_PORT		GPIOC
#define TLI_GREEN6_PIN		GPIO_PIN_7

#define TLI_GREEN7_PORT		GPIOD
#define TLI_GREEN7_PIN		GPIO_PIN_3

#define TLI_BLUE3_PORT		GPIOG		
#define TLI_BLUE3_PIN			GPIO_PIN_11

#define TLI_BLUE4_PORT		GPIOG
#define TLI_BLUE4_PIN			GPIO_PIN_12

#define TLI_BLUE5_PORT		GPIOA
#define TLI_BLUE5_PIN			GPIO_PIN_3

#define TLI_BLUE6_PORT		GPIOB
#define TLI_BLUE6_PIN			GPIO_PIN_8

#define TLI_BLUE7_PORT		GPIOB
#define TLI_BLUE7_PIN			GPIO_PIN_9


#define TLI_WIDTH_PIX			600
#define TLI_HEIGHT_PIX		1024





typedef struct xTliParamStruct
{
	uint32_t hPix;
	uint32_t vPix;
	uint32_t hb;
	uint32_t hf;
	uint32_t vb;
	uint32_t vf;
	uint32_t hs;
	uint32_t vs;
}TliParam_t;








void vtliGpioInit(void);

void vtliFunInit(void);

void vtliDMAInit(void);

uint32_t xtliGetLayer0Addr(void);

uint32_t xtliGetLayer1Addr(void);



#endif
